/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package swing.dialog;

import java.awt.GridLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;

/**
 *
 * @author Administrator
 */
public class Test extends JFrame
{
  JLabel label1 = new JLabel("Address");
  JLabel label2 = new JLabel("City");
  JLabel label3 = new JLabel("State");
  JLabel label4 = new JLabel("zip code");

  JTextField addressField = new JTextField();
  JTextField cityField = new JTextField();
  JTextField stateField = new JTextField();
  JTextField zipCodeField = new JTextField();
  public void init()
  {
    this.setTitle("Dialog");
    this.setLayout(new GridLayout(4, 2));
    this.add(label1);
    this.add(addressField);
    this.add(label2);
    this.add(cityField);
    this.add(label3);
    this.add(stateField);
    this.add(label4);
    this.add(zipCodeField);
  }
  public Test()
  {
    init();
  }
  public static void main(String[] args)
  {
    Test test = new Test();
    test.setDefaultCloseOperation(EXIT_ON_CLOSE);
    test.setSize(150, 120);
    test.setVisible(true);
  }
}
